sum = 0
for i in range(1,101):
    sum+=i
print("使用for循环计算1-100的和为:",sum)

sum = 0
i=1
while i<=100:
    sum+=i
    i+=1
print("使用while循环计算1-100的和为:",sum)